Server-based computing allows a networked client device, remotely situated with respect to a server, to access computing resources on the server. For example, the client device may run desktop client software that uses a remote desktop protocol (referred to herein as “remoting protocol”), such as Remote Desktop Protocol (RDP), Virtual Network Computing (VNC), or Personal Computer over Internet Protocol (PCoIP), to access his or her desktop running on a remote server. The client device transmits user inputs, such as keyboard or mouse inputs, to the remote server to be processed there. Then, the desktop client software receives an image of a graphical user interface (GUI) (in the form of image data) from the remote server. The GUI and the image data received by the desktop client software are generated by the operating system and applications running in the remote server, in some instances within a virtual machine that is executing on the remote server, that are continually processing the user inputs as they are received from the client device.
Remoting protocols often use compression to reduce the amount of image data that are transferred to the client device. Compression can be divided into two basic types—lossless compression and lossy compression. Lossless compression allows the image to be reproduced on the client device with full fidelity. Lossy compression reduces the amount of image data transferred to the client device, thus using less bandwidth, but this comes at a cost—lower quality in the image reconstructed at the client device.
For certain image types, such as text and simple geometric shapes, even modest levels of lossy compression can introduce image artifacts and significantly degrade a user's experience. Thus, many remoting protocols use lossless compression to handle these image types. Consequently, some remoting protocols perform a lightweight analysis of different areas of a desktop image in order to determine which compression algorithm to apply to each area. However, due to the nature of the low-cost techniques used by remoting protocols to select compression algorithms, sub-optimal compression algorithms may be selected for certain image areas. Sub-optimal and inappropriate compression can cause image degradation that becomes visually apparent to the user.